<page-header [title]="pageTitle" [autoBreadcrumb]="false" [action]="action">
  <ng-template #action>
    <div *ngIf="userSrv.userInfo.is_group">
      <button
        nz-button
        (click)="add($event)"
        [nzType]="'primary'"
        [nzSize]="'large'"
      >
        新建
      </button>
    </div>
  </ng-template>
</page-header>

<div class="ngx-alain__page-content-nz-card">
  <nz-card>
    <sf
      #sf
      mode="search"
      [schema]="schemaData.search"
      [formData]="tableParams"
      (formSubmit)="searchSubmit(st, $event)"
      (formReset)="st.reset(tableParams)"
      class="search-form"
      [button]="'none'"
    >
      <nz-form-item class="sf-btns">
        <nz-form-control class="ant-form-item-control-wrapper">
          <div class="ant-form-item-control">
            <button
              type="submit"
              nz-button
              [nzType]="'primary'"
              [nzLoading]="httpSrv.loading"
            >
              查询
            </button>
          </div>
        </nz-form-control>
        <nz-form-control class="ant-form-item-control-wrapper">
          <div class="ant-form-item-control">
            <button nz-button (click)="appCase.exportXlsFromSt(st)">
              导出
            </button>
          </div>
        </nz-form-control>
      </nz-form-item>
    </sf>
  </nz-card>
  <nz-card [nzBordered]="false">
    <div nz-row nzGutter="16">
      <div
        nz-col
        [nzSpan]="userSrv.userInfo.is_group ? '5' : '24'"
        [nzLg]="userSrv.userInfo.is_group ? '5' : '24'"
        nzXs="24"
        *ngIf="userSrv.userInfo.is_group"
      >
        <nz-card>
          <div
            [jstree]="jstree"
            (jstreeChange)="jstreeChange($event)"
            class="jstree"
          ></div>
        </nz-card>
      </div>
      <div
        nz-col
        [nzSpan]="userSrv.userInfo.is_group ? '19' : '24'"
        [nzLg]="userSrv.userInfo.is_group ? '19' : '24'"
        nzXs="24"
      >
        <st
          #st
          [data]="dataSource.url"
          [columns]="tableData.col"
          [req]="tableReq"
          (change)="stChange($event)"
        ></st>
      </div>
    </div>
  </nz-card>
</div>
